package com.sushuo.api.web.error;

import com.sushuo.api.web.StatusCode;

public class ParamException extends RuntimeException {
    
    private static final long serialVersionUID = 7747811165160470941L;
    
    private int errorCode;
    
    private String errorMessage;
    
    public ParamException() {
        super();
    }
    
    public ParamException(int errorCode, String errorMessage) {
        super();
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }
    
    public ParamException(StatusCode sCode){
        super();
        this.errorCode = sCode.getValue();
        this.errorMessage = sCode.getMsg();
    }
    
    public int getErrorCode() {
        return errorCode;
    }
    
    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }
    
    public String getErrorMessage() {
        return errorMessage;
    }
    
    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
    
}
